public class Main {
    //泛型
    public static void main(String[] args) {
        MyArray<Integer> myArray1=new MyArray<>();
        myArray1.setArray(0,15);
        int num=myArray1.getVal(0);
        System.out.println(num);
        MyArray<String> myArray2=new MyArray<>();
        myArray2.setArray(1,"hello");
        String str= myArray2.getVal(1);
        System.out.println(str);
    }
}